﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 药品信息管理
{
    public partial class 装入药品 : Form
    {
        public static string cmdtext1 = "";
        public string addtext2 = "";
        public string addtext3 = "";
        public string addtext4 = "";
        public 装入药品()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (checkBox1.Checked)
            {
                addtext2 = addtext2 + ",0";
            }
            if (checkBox2.Checked)
            {
                addtext2 = addtext2 + ",1";
            }
            if (checkBox3.Checked)
            {
                addtext2 = addtext2 + ",2";
            }

            cmdtext1 = " or(  lx in(3" + addtext2 + ")  " + addtext3 + addtext4+")" ;
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            cmdtext1 = "";
            this.Close();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            addtext3 = "  and  bm between '" + textBox1.Text.ToString().Trim() + "'  ";
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            addtext4 = "  and    '" + textBox2.Text.ToString().Trim() + "'  ";
        }

        public static string cmdtext()
        {
            return cmdtext1 ;
        }

    }
}